package com.yuntian.mapper;


import com.yuntian.entity.DepartmentMaster;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DepartmentMapper {

    /**
     * 获取所有部门
     * @return 部门列表
     * @author yuntian
     */
    @Select("select * from M005")
    List<DepartmentMaster> getAllDepartments();

    /**
     * 根据部门コード获取部门信息
     */
    @Select("select * from M005 where M00501 = #{code}")
    DepartmentMaster getDepartmentByCode(String code);
}
